﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Sessions.aspx.cs" Inherits="ManagementWeb.Sessions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="SessionUID" DataSourceID="SessionDataSource">
        <AlternatingItemTemplate>
            <tr style="background-color: #FFFFFF;color: #284775;">
                <td>
                    <asp:Label ID="StartedOnLabel" runat="server" Text='<%# Eval("StartedOn") %>' />
                </td>
                <td>
                    <asp:Label ID="EndedOnLabel" runat="server" Text='<%# Eval("EndedOn") %>' />
                </td>
                <td>
                    <asp:Label ID="RemoteIPLabel" runat="server" Text='<%# Eval("RemoteIP") %>' />
                </td>
                <td>
                    <asp:Label ID="EncodingLabel" runat="server" Text='<%# Eval("Encoding") %>' />
                </td>
                <td>
                    <asp:Label ID="UserLabel" runat="server" Text='<%# Eval("User") %>' />
                </td>
            </tr>
        </AlternatingItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                <tr>
                    <td>No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <ItemTemplate>
            <tr style="background-color: #E0FFFF;color: #333333;">
                <td>
                    <asp:Label ID="StartedOnLabel" runat="server" Text='<%# Eval("StartedOn") %>' />
                </td>
                <td>
                    <asp:Label ID="EndedOnLabel" runat="server" Text='<%# Eval("EndedOn") %>' />
                </td>
                <td>
                    <asp:Label ID="RemoteIPLabel" runat="server" Text='<%# Eval("RemoteIP") %>' />
                </td>
                <td>
                    <asp:Label ID="EncodingLabel" runat="server" Text='<%# Eval("Encoding") %>' />
                </td>
                <td>
                    <asp:Label ID="UserLabel" runat="server" Text='<%# Eval("User") %>' />
                </td>
            </tr>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr runat="server" style="background-color: #E0FFFF;color: #333333;">
                                <th runat="server">StartedOn</th>
                                <th runat="server">EndedOn</th>
                                <th runat="server">RemoteIP</th>
                                <th runat="server">Encoding</th>
                                <th runat="server">User</th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="text-align: center;background-color: #5D7B9D;font-family: Verdana, Arial, Helvetica, sans-serif;color: #FFFFFF">
                        <asp:DataPager ID="DataPager1" runat="server">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                <asp:NumericPagerField />
                                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <tr style="background-color: #E2DED6;font-weight: bold;color: #333333;">
                <td>
                    <asp:Label ID="StartedOnLabel" runat="server" Text='<%# Eval("StartedOn") %>' />
                </td>
                <td>
                    <asp:Label ID="EndedOnLabel" runat="server" Text='<%# Eval("EndedOn") %>' />
                </td>
                <td>
                    <asp:Label ID="RemoteIPLabel" runat="server" Text='<%# Eval("RemoteIP") %>' />
                </td>
                <td>
                    <asp:Label ID="EncodingLabel" runat="server" Text='<%# Eval("Encoding") %>' />
                </td>
                <td>
                    <asp:Label ID="UserLabel" runat="server" Text='<%# Eval("User") %>' />
                </td>
            </tr>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:EntityDataSource ID="SessionDataSource" runat="server" ConnectionString="name=WorldBankBBSEntities" DefaultContainerName="WorldBankBBSEntities" EnableFlattening="False" EntitySetName="Sessions" AutoSort="True" OrderBy='it.EndedOn DESC' >
    </asp:EntityDataSource>
</asp:Content>
